package org.corey.share.db.dao;

import org.corey.share.misc.PageData;

@SuppressWarnings("unchecked")
public interface BaseDao {
	public boolean save(Object entity);

	public boolean remove(Object entity);

	public boolean update(Object entity);

	public <T> PageData<T> findAll(int pageSize, int pageIndex,Class<T> cls,String orderBy);
	
	public <T> PageData<T> findAll(int pageSize, int pageIndex,Class<T> cls,Long userId,String orderBy);

	public Object load(Long key, Class clazz);
}
